package main

import (
	"fmt"
)

func main() {
	arr := [5]int{12, 6, 7, 15, 4}
	sort(&arr)
	fmt.Println(arr)
}

func sort(arr1 *[5]int) {
	fmt.Println(*arr1)
	tem := (*arr1)[0]
	for j := 0; j < len(arr1)-1; j++ {
		for i := 0; i < len(arr1)-1-j; i++ {
			if (*arr1)[i] > (*arr1)[i+1] {
				tem = (*arr1)[i]
				(*arr1)[i] = (*arr1)[i+1]
				(*arr1)[i+1] = tem
			}
		}

	}

}
